(global.webpackJsonp = global.webpackJsonp || []).push([ [ "punchcard/commentDetail" ], {
    "5c05": function(t, n, i) {
        (function(t) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var e, o = i("b806"), r = (i("a71e"), i("7a6d"), function(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }(i("801c"))), a = i("db8f"), u = i("26cb"), c = i("bc33"), d = i("7960"), s = i("a71e");
            function f(t) {
                return function(t) {
                    if (Array.isArray(t)) return l(t);
                }(t) || function(t) {
                    if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) return Array.from(t);
                }(t) || function(t, n) {
                    if (t) {
                        if ("string" == typeof t) return l(t, n);
                        var i = Object.prototype.toString.call(t).slice(8, -1);
                        return "Object" === i && t.constructor && (i = t.constructor.name), "Map" === i || "Set" === i ? Array.from(t) : "Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i) ? l(t, n) : void 0;
                    }
                }(t) || function() {
                    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
                }();
            }
            function l(t, n) {
                (null == n || n > t.length) && (n = t.length);
                for (var i = 0, e = new Array(n); i < n; i++) e[i] = t[i];
                return e;
            }
            function h(t, n) {
                var i = Object.keys(t);
                if (Object.getOwnPropertySymbols) {
                    var e = Object.getOwnPropertySymbols(t);
                    n && (e = e.filter(function(n) {
                        return Object.getOwnPropertyDescriptor(t, n).enumerable;
                    })), i.push.apply(i, e);
                }
                return i;
            }
            function p(t) {
                for (var n = 1; n < arguments.length; n++) {
                    var i = null != arguments[n] ? arguments[n] : {};
                    n % 2 ? h(Object(i), !0).forEach(function(n) {
                        m(t, n, i[n]);
                    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : h(Object(i)).forEach(function(n) {
                        Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(i, n));
                    });
                }
                return t;
            }
            function m(t, n, i) {
                return n in t ? Object.defineProperty(t, n, {
                    value: i,
                    enumerable: !0,
                    configurable: !0,
                    writable: !0
                }) : t[n] = i, t;
            }
            var g = {
                data: function() {
                    return {
                        article: {
                            id: ""
                        },
                        attribute: {
                            is_zan: !1,
                            is_collect: !1
                        },
                        comment: [],
                        comment_action: {
                            cid: 0,
                            uid: 0
                        },
                        show_share: !1,
                        input_height: 0,
                        inputfocus: !1,
                        isContent: !1,
                        inputText: "",
                        params: {
                            type: 3,
                            id: ""
                        },
                        isbar: "",
                        text: "",
                        pager: 1,
                        is_wxh5: !1,
                        is_h5: !1,
                        H5focus: !0,
                        isRequest: !1,
                        diaryId: -1,
                        diaryinfo: {},
                        innerAudioContext: "",
                        isAudioplay: !1,
                        punchcardId: -1,
                        commentTotal: 0,
                        scWidth: 0,
                        animateColor: ""
                    };
                },
                computed: p(p({}, (0, u.mapGetters)([ "mainColor", "user", "iphoneXStyle" ])), {}, {
                    send: function() {
                        return {
                            "background-color": this.mainColor,
                            color: "#fff"
                        };
                    },
                    nosend: function() {
                        return {
                            color: this.mainColor,
                            border: "1rpx solid " + this.mainColor,
                            "background-color": "#fff",
                            opcity: "0.5"
                        };
                    }
                }),
                created: function() {},
                onShow: function() {
                    (0, o.init)(this).then(function(t) {});
                },
                onLoad: function(n) {
                    var i = this;
                    e = this, console.log(n), i.animateColor = (0, a.colorRgba)(i.mainColor, .5), i.diaryId = n.diaryId || n.id || (0, 
                    a.getPageId)(i).id, i.punchcardId = n.punchcardId, i.getdiaryInfo(), y(), i.commentTotal = n.commentCount, 
                    i.innerAudioContext = t.createInnerAudioContext(), i.innerAudioContext.onEnded(function() {
                        i.isAudioplay = !1;
                    });
                    var o = t.getSystemInfoSync();
                    i.scWidth = o.windowWidth - 54, (0, s.isEmpty)(n.pid) || r.default.commit("config/SET_PID", n.pid), 
                    (0, s.isEmpty)(decodeURIComponent(n.scene).split("pid=")[1]) || r.default.commit("config/SET_PID", decodeURIComponent(n.scene).split("pid=")[1]);
                },
                onShareAppMessage: function(t) {
                    return "button" === t.from && this.$refs.BotShow.isBotShow(), {
                        title: "日记详情",
                        path: "/punchcard/commentDetail?id=" + this.diaryId + "&punchcardId=" + this.punchcardId + "&pid=" + this.user.id
                    };
                },
                onShareTimeline: function() {
                    return {
                        title: "日记详情",
                        query: 0,
                        imageUrl: ""
                    };
                },
                mounted: function() {},
                methods: {
                    shareModal: function(t) {},
                    bindPhoneSuccess: function() {},
                    successLogins: function() {},
                    hideModal: function(t) {
                        this.show_share = !1;
                    },
                    hideInput: function() {
                        console.log("失去焦点，评论弹窗收起"), this.inputfocus = !1, this.isContent = !1, this.input_height = 0, 
                        this.comment_action = {};
                    },
                    inputContent: function(t) {
                        return t.detail.value ? (this.isContent = !0, void (this.inputText = t.detail.value)) : t.detail.value ? void 0 : (this.isContent = !1, 
                        void (this.inputText = ""));
                    },
                    keyboardheightchange: function(t) {
                        this.input_height = t.detail.height;
                    },
                    H5Focus: function(t) {
                        this.input_height = t.detail.height, 0 == this.input_height && this.hideInput();
                    },
                    share: function() {
                        var t = this;
                        (0, d.h5JudgeLogin)(2).then(function(n) {
                            n || t.$refs.BotShow.isBotShow();
                        });
                    },
                    action: function(t) {
                        (0, d.h5JudgeLogin)(2).then(function(n) {
                            n || artcAtbute({
                                action: t,
                                id: e.params.id
                            }).then(function(n) {
                                if ("zan" != t) return e.attribute.is_collect = !e.attribute.is_collect, e.attribute.is_collect ? void e.$toast("收藏成功", "none") : void e.$toast("取消收藏", "none");
                                n ? e.article.zan_num++ : e.article.zan_num--, e.attribute.is_zan = !e.attribute.is_zan;
                            });
                        });
                    },
                    isCommentShow: function(t) {
                        var n = this;
                        (0, d.h5JudgeLogin)(2).then(function(i) {
                            if (!i) {
                                if (t.uid == n.user.id) return n.$toast("不能评论自己", "none"), void n.hideInput();
                                n.comment_action = t, console.log("手动点击"), n.clickInput();
                            }
                        });
                    },
                    clickInput: function() {
                        var t = this;
                        (0, d.h5JudgeLogin)(2).then(function(n) {
                            n || (t.inputfocus = !0, t.isContent = !1);
                        });
                    },
                    commentRe: function() {
                        var t = this.comment_action;
                        if (!this.inputText) return this.$toast("请输入评论内容", "none"), this.input_height = 0, 
                        this.inputfocus = !1, this.comment_action = {}, this.isContent = !1, void (this.inputText = "");
                        var n = {
                            diary_id: this.diaryId,
                            punchcard_id: this.punchcardId,
                            content: this.inputText,
                            cid: t.cid ? t.cid : 0,
                            uid: t.uid ? t.uid : 0
                        };
                        (0, c.punchcardComment)(n).then(function(n) {
                            e.pager = 1, y(), e.inputfocus = !1, e.isContent = !1, e.input_height = 0, e.inputText = "", 
                            t.cid = 0, t.uid = 0, e.$toast("评论成功", "none"), e.getdiaryInfo();
                        });
                    },
                    getdiaryInfo: function() {
                        var t = this;
                        (0, c.diaryInfo)({
                            diary_id: this.diaryId
                        }).then(function(n) {
                            t.diaryinfo = n;
                        });
                    },
                    playAudio: function(t) {
                        this.isAudioplay = !this.isAudioplay, this.innerAudioContext.src = t, this.isAudioplay ? this.innerAudioContext.play() : this.innerAudioContext.pause();
                    },
                    previewImage: function(n, i) {
                        t.previewImage({
                            current: n,
                            urls: i
                        });
                    }
                },
                onReachBottom: function() {
                    e.pager++, y();
                }
            };
            function y() {
                var t = {
                    diary_id: e.diaryId,
                    page: e.pager,
                    pagesize: 10,
                    isLoading: !1
                };
                (0, c.diaryCommentList)(t).then(function(t) {
                    var n = e.comment, i = t.list;
                    n && 1 != e.pager && (i = [].concat(f(n), f(i))), e.comment = i, e.isRequest = 0 == e.comment.length;
                });
            }
            n.default = g;
        }).call(this, i("543d").default);
    },
    "79bb": function(t, n, i) {
        var e = i("ac8a");
        i.n(e).a;
    },
    9503: function(t, n, i) {
        i.r(n);
        var e = i("5c05"), o = i.n(e);
        for (var r in e) "default" !== r && function(t) {
            i.d(n, t, function() {
                return e[t];
            });
        }(r);
        n.default = o.a;
    },
    ac8a: function(t, n, i) {},
    bfb7: function(t, n, i) {
        i.r(n);
        var e = i("d5f8"), o = i("9503");
        for (var r in o) "default" !== r && function(t) {
            i.d(n, t, function() {
                return o[t];
            });
        }(r);
        i("79bb");
        var a = i("f0c5"), u = Object(a.a)(o.default, e.b, e.c, !1, null, "3d2f043a", null, !1, e.a, void 0);
        n.default = u.exports;
    },
    d1a7: function(t, n, i) {
        (function(t) {
            i("1067"), e(i("66fd"));
            var n = e(i("bfb7"));
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = i, t(n.default);
        }).call(this, i("543d").createPage);
    },
    d5f8: function(t, n, i) {
        i.d(n, "b", function() {
            return e;
        }), i.d(n, "c", function() {
            return o;
        }), i.d(n, "a", function() {});
        var e = function() {
            var t = this, n = (t.$createElement, t._self._c, t.article && null != t.diaryinfo.video ? parseFloat(t.diaryinfo.video_weight) : null), i = t.article && null != t.diaryinfo.video ? parseFloat(t.diaryinfo.video_height) : null, e = t.inputfocus ? null : t.__get_style([ t.isContent ? t.send : t.nosend ]), o = t.inputfocus ? t.__get_style([ t.isContent ? t.send : t.nosend ]) : null;
            t._isMounted || (t.e0 = function(n) {
                t.text = n.detail.value;
            }), t.$mp.data = Object.assign({}, {
                $root: {
                    m0: n,
                    m1: i,
                    s0: e,
                    s1: o
                }
            });
        }, o = [];
    }
}, [ [ "d1a7", "common/runtime", "common/vendor" ] ] ]);